package com.example.orderserver.exception;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
public class R {
    private Integer code;
    private String message;
    private Object data;

    R(Integer code,String message){
        this.code = code;
        this.message = message;
    }

    public static R error(Integer code,String message) {
        return new R(code,message);
    }
}
